module Primary = struct
  module Action = struct
    let t_of_yojson = function
      | `String "transferred" -> Ok "transferred"
      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

    type t = (string[@of_yojson t_of_yojson])
    [@@deriving yojson { strict = false; meta = true }, show, eq]
  end

  module Changes = struct
    module Primary = struct
      module New_issue = struct
        module Primary = struct
          module Active_lock_reason = struct
            let t_of_yojson = function
              | `String "resolved" -> Ok "resolved"
              | `String "off-topic" -> Ok "off-topic"
              | `String "too heated" -> Ok "too heated"
              | `String "spam" -> Ok "spam"
              | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

            type t = (string[@of_yojson t_of_yojson])
            [@@deriving yojson { strict = false; meta = true }, show, eq]
          end

          module Assignee = struct
            module Primary = struct
              module Type = struct
                let t_of_yojson = function
                  | `String "Bot" -> Ok "Bot"
                  | `String "User" -> Ok "User"
                  | `String "Organization" -> Ok "Organization"
                  | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                type t = (string[@of_yojson t_of_yojson])
                [@@deriving yojson { strict = false; meta = true }, show, eq]
              end

              type t = {
                avatar_url : string option; [@default None]
                deleted : bool option; [@default None]
                email : string option; [@default None]
                events_url : string option; [@default None]
                followers_url : string option; [@default None]
                following_url : string option; [@default None]
                gists_url : string option; [@default None]
                gravatar_id : string option; [@default None]
                html_url : string option; [@default None]
                id : int;
                login : string;
                name : string option; [@default None]
                node_id : string option; [@default None]
                organizations_url : string option; [@default None]
                received_events_url : string option; [@default None]
                repos_url : string option; [@default None]
                site_admin : bool option; [@default None]
                starred_url : string option; [@default None]
                subscriptions_url : string option; [@default None]
                type_ : Type.t option; [@default None] [@key "type"]
                url : string option; [@default None]
                user_view_type : string option; [@default None]
              }
              [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
          end

          module Assignees = struct
            module Items = struct
              module Primary = struct
                module Type = struct
                  let t_of_yojson = function
                    | `String "Bot" -> Ok "Bot"
                    | `String "User" -> Ok "User"
                    | `String "Organization" -> Ok "Organization"
                    | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                  type t = (string[@of_yojson t_of_yojson])
                  [@@deriving yojson { strict = false; meta = true }, show, eq]
                end

                type t = {
                  avatar_url : string option; [@default None]
                  deleted : bool option; [@default None]
                  email : string option; [@default None]
                  events_url : string option; [@default None]
                  followers_url : string option; [@default None]
                  following_url : string option; [@default None]
                  gists_url : string option; [@default None]
                  gravatar_id : string option; [@default None]
                  html_url : string option; [@default None]
                  id : int;
                  login : string;
                  name : string option; [@default None]
                  node_id : string option; [@default None]
                  organizations_url : string option; [@default None]
                  received_events_url : string option; [@default None]
                  repos_url : string option; [@default None]
                  site_admin : bool option; [@default None]
                  starred_url : string option; [@default None]
                  subscriptions_url : string option; [@default None]
                  type_ : Type.t option; [@default None] [@key "type"]
                  url : string option; [@default None]
                  user_view_type : string option; [@default None]
                }
                [@@deriving yojson { strict = false; meta = true }, show, eq]
              end

              include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
            end

            type t = Items.t list [@@deriving yojson { strict = false; meta = true }, show, eq]
          end

          module Author_association_ = struct
            let t_of_yojson = function
              | `String "COLLABORATOR" -> Ok "COLLABORATOR"
              | `String "CONTRIBUTOR" -> Ok "CONTRIBUTOR"
              | `String "FIRST_TIMER" -> Ok "FIRST_TIMER"
              | `String "FIRST_TIME_CONTRIBUTOR" -> Ok "FIRST_TIME_CONTRIBUTOR"
              | `String "MANNEQUIN" -> Ok "MANNEQUIN"
              | `String "MEMBER" -> Ok "MEMBER"
              | `String "NONE" -> Ok "NONE"
              | `String "OWNER" -> Ok "OWNER"
              | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

            type t = (string[@of_yojson t_of_yojson])
            [@@deriving yojson { strict = false; meta = true }, show, eq]
          end

          module Labels = struct
            module Items = struct
              module Primary = struct
                type t = {
                  color : string;
                  default : bool;
                  description : string option; [@default None]
                  id : int;
                  name : string;
                  node_id : string;
                  url : string;
                }
                [@@deriving yojson { strict = false; meta = true }, show, eq]
              end

              include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
            end

            type t = Items.t list [@@deriving yojson { strict = false; meta = true }, show, eq]
          end

          module Milestone_ = struct
            module Primary = struct
              module Creator = struct
                module Primary = struct
                  module Type = struct
                    let t_of_yojson = function
                      | `String "Bot" -> Ok "Bot"
                      | `String "User" -> Ok "User"
                      | `String "Organization" -> Ok "Organization"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  type t = {
                    avatar_url : string option; [@default None]
                    deleted : bool option; [@default None]
                    email : string option; [@default None]
                    events_url : string option; [@default None]
                    followers_url : string option; [@default None]
                    following_url : string option; [@default None]
                    gists_url : string option; [@default None]
                    gravatar_id : string option; [@default None]
                    html_url : string option; [@default None]
                    id : int;
                    login : string;
                    name : string option; [@default None]
                    node_id : string option; [@default None]
                    organizations_url : string option; [@default None]
                    received_events_url : string option; [@default None]
                    repos_url : string option; [@default None]
                    site_admin : bool option; [@default None]
                    starred_url : string option; [@default None]
                    subscriptions_url : string option; [@default None]
                    type_ : Type.t option; [@default None] [@key "type"]
                    url : string option; [@default None]
                    user_view_type : string option; [@default None]
                  }
                  [@@deriving yojson { strict = false; meta = true }, show, eq]
                end

                include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
              end

              module State = struct
                let t_of_yojson = function
                  | `String "open" -> Ok "open"
                  | `String "closed" -> Ok "closed"
                  | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                type t = (string[@of_yojson t_of_yojson])
                [@@deriving yojson { strict = false; meta = true }, show, eq]
              end

              type t = {
                closed_at : string option; [@default None]
                closed_issues : int;
                created_at : string;
                creator : Creator.t option; [@default None]
                description : string option; [@default None]
                due_on : string option; [@default None]
                html_url : string;
                id : int;
                labels_url : string;
                node_id : string;
                number : int;
                open_issues : int;
                state : State.t;
                title : string;
                updated_at : string;
                url : string;
              }
              [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
          end

          module Performed_via_github_app = struct
            module Primary = struct
              module Events = struct
                module Items = struct
                  let t_of_yojson = function
                    | `String "branch_protection_rule" -> Ok "branch_protection_rule"
                    | `String "check_run" -> Ok "check_run"
                    | `String "check_suite" -> Ok "check_suite"
                    | `String "code_scanning_alert" -> Ok "code_scanning_alert"
                    | `String "commit_comment" -> Ok "commit_comment"
                    | `String "content_reference" -> Ok "content_reference"
                    | `String "create" -> Ok "create"
                    | `String "delete" -> Ok "delete"
                    | `String "deployment" -> Ok "deployment"
                    | `String "deployment_review" -> Ok "deployment_review"
                    | `String "deployment_status" -> Ok "deployment_status"
                    | `String "deploy_key" -> Ok "deploy_key"
                    | `String "discussion" -> Ok "discussion"
                    | `String "discussion_comment" -> Ok "discussion_comment"
                    | `String "fork" -> Ok "fork"
                    | `String "gollum" -> Ok "gollum"
                    | `String "issues" -> Ok "issues"
                    | `String "issue_comment" -> Ok "issue_comment"
                    | `String "label" -> Ok "label"
                    | `String "member" -> Ok "member"
                    | `String "membership" -> Ok "membership"
                    | `String "milestone" -> Ok "milestone"
                    | `String "organization" -> Ok "organization"
                    | `String "org_block" -> Ok "org_block"
                    | `String "page_build" -> Ok "page_build"
                    | `String "project" -> Ok "project"
                    | `String "project_card" -> Ok "project_card"
                    | `String "project_column" -> Ok "project_column"
                    | `String "public" -> Ok "public"
                    | `String "pull_request" -> Ok "pull_request"
                    | `String "pull_request_review" -> Ok "pull_request_review"
                    | `String "pull_request_review_comment" -> Ok "pull_request_review_comment"
                    | `String "push" -> Ok "push"
                    | `String "registry_package" -> Ok "registry_package"
                    | `String "release" -> Ok "release"
                    | `String "repository" -> Ok "repository"
                    | `String "repository_dispatch" -> Ok "repository_dispatch"
                    | `String "secret_scanning_alert" -> Ok "secret_scanning_alert"
                    | `String "star" -> Ok "star"
                    | `String "status" -> Ok "status"
                    | `String "team" -> Ok "team"
                    | `String "team_add" -> Ok "team_add"
                    | `String "watch" -> Ok "watch"
                    | `String "workflow_dispatch" -> Ok "workflow_dispatch"
                    | `String "workflow_run" -> Ok "workflow_run"
                    | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                  type t = (string[@of_yojson t_of_yojson])
                  [@@deriving yojson { strict = false; meta = true }, show, eq]
                end

                type t = Items.t list [@@deriving yojson { strict = false; meta = true }, show, eq]
              end

              module Owner = struct
                module Primary = struct
                  module Type = struct
                    let t_of_yojson = function
                      | `String "Bot" -> Ok "Bot"
                      | `String "User" -> Ok "User"
                      | `String "Organization" -> Ok "Organization"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  type t = {
                    avatar_url : string option; [@default None]
                    deleted : bool option; [@default None]
                    email : string option; [@default None]
                    events_url : string option; [@default None]
                    followers_url : string option; [@default None]
                    following_url : string option; [@default None]
                    gists_url : string option; [@default None]
                    gravatar_id : string option; [@default None]
                    html_url : string option; [@default None]
                    id : int;
                    login : string;
                    name : string option; [@default None]
                    node_id : string option; [@default None]
                    organizations_url : string option; [@default None]
                    received_events_url : string option; [@default None]
                    repos_url : string option; [@default None]
                    site_admin : bool option; [@default None]
                    starred_url : string option; [@default None]
                    subscriptions_url : string option; [@default None]
                    type_ : Type.t option; [@default None] [@key "type"]
                    url : string option; [@default None]
                    user_view_type : string option; [@default None]
                  }
                  [@@deriving yojson { strict = false; meta = true }, show, eq]
                end

                include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
              end

              module Permissions = struct
                module Primary = struct
                  module Actions = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Administration = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Checks = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Content_references = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Contents = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Deployments = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Discussions = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Emails = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Environments = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Issues = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Keys = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Members = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Metadata_ = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Organization_administration = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Organization_hooks = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Organization_packages = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Organization_plan = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Organization_projects = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Organization_secrets = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Organization_self_hosted_runners = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Organization_user_blocking = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Packages = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Pages = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Pull_requests = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Repository_hooks = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Repository_projects = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Secret_scanning_alerts = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Secrets = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Security_events = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Security_scanning_alert = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Single_file = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Statuses = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Team_discussions = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Vulnerability_alerts = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  module Workflows = struct
                    let t_of_yojson = function
                      | `String "read" -> Ok "read"
                      | `String "write" -> Ok "write"
                      | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                    type t = (string[@of_yojson t_of_yojson])
                    [@@deriving yojson { strict = false; meta = true }, show, eq]
                  end

                  type t = {
                    actions : Actions.t option; [@default None]
                    administration : Administration.t option; [@default None]
                    checks : Checks.t option; [@default None]
                    content_references : Content_references.t option; [@default None]
                    contents : Contents.t option; [@default None]
                    deployments : Deployments.t option; [@default None]
                    discussions : Discussions.t option; [@default None]
                    emails : Emails.t option; [@default None]
                    environments : Environments.t option; [@default None]
                    issues : Issues.t option; [@default None]
                    keys : Keys.t option; [@default None]
                    members : Members.t option; [@default None]
                    metadata : Metadata_.t option; [@default None]
                    organization_administration : Organization_administration.t option;
                        [@default None]
                    organization_hooks : Organization_hooks.t option; [@default None]
                    organization_packages : Organization_packages.t option; [@default None]
                    organization_plan : Organization_plan.t option; [@default None]
                    organization_projects : Organization_projects.t option; [@default None]
                    organization_secrets : Organization_secrets.t option; [@default None]
                    organization_self_hosted_runners : Organization_self_hosted_runners.t option;
                        [@default None]
                    organization_user_blocking : Organization_user_blocking.t option;
                        [@default None]
                    packages : Packages.t option; [@default None]
                    pages : Pages.t option; [@default None]
                    pull_requests : Pull_requests.t option; [@default None]
                    repository_hooks : Repository_hooks.t option; [@default None]
                    repository_projects : Repository_projects.t option; [@default None]
                    secret_scanning_alerts : Secret_scanning_alerts.t option; [@default None]
                    secrets : Secrets.t option; [@default None]
                    security_events : Security_events.t option; [@default None]
                    security_scanning_alert : Security_scanning_alert.t option; [@default None]
                    single_file : Single_file.t option; [@default None]
                    statuses : Statuses.t option; [@default None]
                    team_discussions : Team_discussions.t option; [@default None]
                    vulnerability_alerts : Vulnerability_alerts.t option; [@default None]
                    workflows : Workflows.t option; [@default None]
                  }
                  [@@deriving yojson { strict = false; meta = true }, show, eq]
                end

                include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
              end

              type t = {
                created_at : string option; [@default None]
                description : string option; [@default None]
                events : Events.t option; [@default None]
                external_url : string option; [@default None]
                html_url : string;
                id : int option; [@default None]
                name : string;
                node_id : string;
                owner : Owner.t option; [@default None]
                permissions : Permissions.t option; [@default None]
                slug : string option; [@default None]
                updated_at : string option; [@default None]
              }
              [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
          end

          module Pull_request_ = struct
            module Primary = struct
              type t = {
                diff_url : string option; [@default None]
                html_url : string option; [@default None]
                merged_at : string option; [@default None]
                patch_url : string option; [@default None]
                url : string option; [@default None]
              }
              [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
          end

          module Reactions = struct
            module Primary = struct
              type t = {
                plus_one : int; [@key "+1"]
                minus_one : int; [@key "-1"]
                confused : int;
                eyes : int;
                heart : int;
                hooray : int;
                laugh : int;
                rocket : int;
                total_count : int;
                url : string;
              }
              [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
          end

          module State = struct
            let t_of_yojson = function
              | `String "open" -> Ok "open"
              | `String "closed" -> Ok "closed"
              | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

            type t = (string[@of_yojson t_of_yojson])
            [@@deriving yojson { strict = false; meta = true }, show, eq]
          end

          module Sub_issues_summary_ = struct
            module Primary = struct
              type t = {
                completed : int;
                percent_completed : int;
                total : int;
              }
              [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
          end

          module User = struct
            module Primary = struct
              module Type = struct
                let t_of_yojson = function
                  | `String "Bot" -> Ok "Bot"
                  | `String "User" -> Ok "User"
                  | `String "Organization" -> Ok "Organization"
                  | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                type t = (string[@of_yojson t_of_yojson])
                [@@deriving yojson { strict = false; meta = true }, show, eq]
              end

              type t = {
                avatar_url : string option; [@default None]
                deleted : bool option; [@default None]
                email : string option; [@default None]
                events_url : string option; [@default None]
                followers_url : string option; [@default None]
                following_url : string option; [@default None]
                gists_url : string option; [@default None]
                gravatar_id : string option; [@default None]
                html_url : string option; [@default None]
                id : int64;
                login : string;
                name : string option; [@default None]
                node_id : string option; [@default None]
                organizations_url : string option; [@default None]
                received_events_url : string option; [@default None]
                repos_url : string option; [@default None]
                site_admin : bool option; [@default None]
                starred_url : string option; [@default None]
                subscriptions_url : string option; [@default None]
                type_ : Type.t option; [@default None] [@key "type"]
                url : string option; [@default None]
                user_view_type : string option; [@default None]
              }
              [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
          end

          type t = {
            active_lock_reason : Active_lock_reason.t option; [@default None]
            assignee : Assignee.t option; [@default None]
            assignees : Assignees.t;
            author_association : Author_association_.t;
            body : string option; [@default None]
            closed_at : string option; [@default None]
            comments : int;
            comments_url : string;
            created_at : string;
            draft : bool option; [@default None]
            events_url : string;
            html_url : string;
            id : int64;
            labels : Labels.t option; [@default None]
            labels_url : string;
            locked : bool option; [@default None]
            milestone : Milestone_.t option; [@default None]
            node_id : string;
            number : int;
            performed_via_github_app : Performed_via_github_app.t option; [@default None]
            pull_request : Pull_request_.t option; [@default None]
            reactions : Reactions.t;
            repository_url : string;
            state : State.t option; [@default None]
            state_reason : string option; [@default None]
            sub_issues_summary : Sub_issues_summary_.t option; [@default None]
            timeline_url : string option; [@default None]
            title : string;
            type_ : Githubc2_components_issue_type.t option; [@default None] [@key "type"]
            updated_at : string;
            url : string;
            user : User.t option; [@default None]
          }
          [@@deriving yojson { strict = false; meta = true }, show, eq]
        end

        include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
      end

      module New_repository = struct
        module Primary = struct
          module Created_at = struct
            module V0 = struct
              type t = int [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            module V1 = struct
              type t = string [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            type t =
              | V0 of V0.t
              | V1 of V1.t
            [@@deriving show, eq]

            let of_yojson =
              Json_schema.one_of
                (let open CCResult in
                 [
                   (fun v -> map (fun v -> V0 v) (V0.of_yojson v));
                   (fun v -> map (fun v -> V1 v) (V1.of_yojson v));
                 ])

            let to_yojson = function
              | V0 v -> V0.to_yojson v
              | V1 v -> V1.to_yojson v
          end

          module Custom_properties = struct
            include Json_schema.Additional_properties.Make (Json_schema.Empty_obj) (Json_schema.Obj)
          end

          module License_ = struct
            module Primary = struct
              type t = {
                key : string;
                name : string;
                node_id : string;
                spdx_id : string;
                url : string option; [@default None]
              }
              [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
          end

          module Owner = struct
            module Primary = struct
              module Type = struct
                let t_of_yojson = function
                  | `String "Bot" -> Ok "Bot"
                  | `String "User" -> Ok "User"
                  | `String "Organization" -> Ok "Organization"
                  | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

                type t = (string[@of_yojson t_of_yojson])
                [@@deriving yojson { strict = false; meta = true }, show, eq]
              end

              type t = {
                avatar_url : string option; [@default None]
                deleted : bool option; [@default None]
                email : string option; [@default None]
                events_url : string option; [@default None]
                followers_url : string option; [@default None]
                following_url : string option; [@default None]
                gists_url : string option; [@default None]
                gravatar_id : string option; [@default None]
                html_url : string option; [@default None]
                id : int;
                login : string;
                name : string option; [@default None]
                node_id : string option; [@default None]
                organizations_url : string option; [@default None]
                received_events_url : string option; [@default None]
                repos_url : string option; [@default None]
                site_admin : bool option; [@default None]
                starred_url : string option; [@default None]
                subscriptions_url : string option; [@default None]
                type_ : Type.t option; [@default None] [@key "type"]
                url : string option; [@default None]
                user_view_type : string option; [@default None]
              }
              [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
          end

          module Permissions = struct
            module Primary = struct
              type t = {
                admin : bool;
                maintain : bool option; [@default None]
                pull : bool;
                push : bool;
                triage : bool option; [@default None]
              }
              [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
          end

          module Pushed_at = struct
            module V0 = struct
              type t = int option [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            module V1 = struct
              type t = string option [@@deriving yojson { strict = false; meta = true }, show, eq]
            end

            type t =
              | V0 of V0.t
              | V1 of V1.t
            [@@deriving show, eq]

            let of_yojson =
              Json_schema.one_of
                (let open CCResult in
                 [
                   (fun v -> map (fun v -> V0 v) (V0.of_yojson v));
                   (fun v -> map (fun v -> V1 v) (V1.of_yojson v));
                 ])

            let to_yojson = function
              | V0 v -> V0.to_yojson v
              | V1 v -> V1.to_yojson v
          end

          module Topics = struct
            type t = string list [@@deriving yojson { strict = false; meta = true }, show, eq]
          end

          module Visibility = struct
            let t_of_yojson = function
              | `String "public" -> Ok "public"
              | `String "private" -> Ok "private"
              | `String "internal" -> Ok "internal"
              | json -> Error ("Unknown value: " ^ Yojson.Safe.pretty_to_string json)

            type t = (string[@of_yojson t_of_yojson])
            [@@deriving yojson { strict = false; meta = true }, show, eq]
          end

          type t = {
            allow_auto_merge : bool; [@default false]
            allow_forking : bool option; [@default None]
            allow_merge_commit : bool; [@default true]
            allow_rebase_merge : bool; [@default true]
            allow_squash_merge : bool; [@default true]
            allow_update_branch : bool option; [@default None]
            archive_url : string;
            archived : bool; [@default false]
            assignees_url : string;
            blobs_url : string;
            branches_url : string;
            clone_url : string;
            collaborators_url : string;
            comments_url : string;
            commits_url : string;
            compare_url : string;
            contents_url : string;
            contributors_url : string;
            created_at : Created_at.t;
            custom_properties : Custom_properties.t option; [@default None]
            default_branch : string;
            delete_branch_on_merge : bool; [@default false]
            deployments_url : string;
            description : string option; [@default None]
            disabled : bool option; [@default None]
            downloads_url : string;
            events_url : string;
            fork : bool;
            forks : int;
            forks_count : int;
            forks_url : string;
            full_name : string;
            git_commits_url : string;
            git_refs_url : string;
            git_tags_url : string;
            git_url : string;
            has_discussions : bool; [@default false]
            has_downloads : bool; [@default true]
            has_issues : bool; [@default true]
            has_pages : bool;
            has_projects : bool; [@default true]
            has_wiki : bool; [@default true]
            homepage : string option; [@default None]
            hooks_url : string;
            html_url : string;
            id : int64;
            is_template : bool option; [@default None]
            issue_comment_url : string;
            issue_events_url : string;
            issues_url : string;
            keys_url : string;
            labels_url : string;
            language : string option; [@default None]
            languages_url : string;
            license : License_.t option; [@default None]
            master_branch : string option; [@default None]
            merges_url : string;
            milestones_url : string;
            mirror_url : string option; [@default None]
            name : string;
            node_id : string;
            notifications_url : string;
            open_issues : int;
            open_issues_count : int;
            organization : string option; [@default None]
            owner : Owner.t option; [@default None]
            permissions : Permissions.t option; [@default None]
            private_ : bool; [@key "private"]
            public : bool option; [@default None]
            pulls_url : string;
            pushed_at : Pushed_at.t option; [@default None]
            releases_url : string;
            role_name : string option; [@default None]
            size : int;
            ssh_url : string;
            stargazers : int option; [@default None]
            stargazers_count : int;
            stargazers_url : string;
            statuses_url : string;
            subscribers_url : string;
            subscription_url : string;
            svn_url : string;
            tags_url : string;
            teams_url : string;
            topics : Topics.t;
            trees_url : string;
            updated_at : string;
            url : string;
            visibility : Visibility.t;
            watchers : int;
            watchers_count : int;
            web_commit_signoff_required : bool option; [@default None]
          }
          [@@deriving yojson { strict = false; meta = true }, show, eq]
        end

        include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
      end

      type t = {
        new_issue : New_issue.t;
        new_repository : New_repository.t;
      }
      [@@deriving yojson { strict = false; meta = true }, show, eq]
    end

    include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
  end

  type t = {
    action : Action.t;
    changes : Changes.t;
    enterprise : Githubc2_components_enterprise_webhooks.t option; [@default None]
    installation : Githubc2_components_simple_installation.t option; [@default None]
    issue : Githubc2_components_webhooks_issue_2.t;
    organization : Githubc2_components_organization_simple_webhooks.t option; [@default None]
    repository : Githubc2_components_repository_webhooks.t;
    sender : Githubc2_components_simple_user.t;
  }
  [@@deriving yojson { strict = false; meta = true }, show, eq]
end

include Json_schema.Additional_properties.Make (Primary) (Json_schema.Obj)
